#include <iostream>
#define MAXN 1000
using namespace std;

int N, R, X[MAXN];

void solve();
int main() {
    cin >> N >> R;
    for (int i = 0; i < N; i++) cin >> X[i];
    solve();
    return 0;
}

void solve() {
    int n = 0, i = 0;
    while (i < N) {
        int start;
        for (start = i; start < N; start++) {
            if (X[start] > X[i] + R) break;
        }
        start--;
        for (i = start + 1; i < N; i++) {
            if (X[start] + R < X[i]) break;
        }
        n++;
    }
    cout << n << endl;
}